package com.hdax.dm.scheduler.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hdax.dm.entity.scheduler.SchedulerSeat;
import com.hdax.dm.entity.scheduler.SchedulerSeatPrice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SchedulerSeatPriceMapper extends BaseMapper<SchedulerSeatPrice> {

    @Select({
            "select p.price,s.status from dm_scheduler_seat_price p, dm_scheduler_seat s" +
                    " where p.scheduleId = s.scheduleId "+
                    " and s.areaLevel = p.areaLevel "+
                    " and s.x = #{x} and s.y = #{y} and p.scheduleId = #{scheduleId}"
    })
    SchedulerSeat price(@Param("scheduleId")Long scheduleId, @Param("x")Long x, @Param("y")Long y);
}
